Skip to content

Add Function type to props #2026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2019
Merged

Add Function type to props #2026

merged 2 commits into from
Feb 22, 2019

Conversation

posva
Copy link
Member

@posva posva commented Feb 22, 2019

Hi, I realized we are not showing we can accept a Function which is a basic type in JS, it has misled people to believe they cannot use Functions.

However, I believe we can do better than just adding the line with callback: Function because we can also specify custom constructors or new ones like Promise

Looking forward to hear your feedback

@phanan
Copy link
Member

phanan commented Feb 22, 2019

👍 Even though a Function or a Promise is just an Object (which is already there), being explicit here is a good idea.

@phanan phanan merged commit ce208ae into vuejs:master Feb 22, 2019
phanan pushed a commit to phanan-forks/vuejs.org that referenced this pull request Mar 14, 2019
* Add Function type to props

* add Promise contstructor prop type
phanan pushed a commit to phanan-forks/vuejs.org that referenced this pull request Mar 20, 2019
* Add Function type to props

* add Promise contstructor prop type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants